﻿using System;

namespace HslCommunication.MQTT
{
	/// <summary>
	/// Mqtt协议的验证对象，包含用户名和密码<br />
	/// Authentication object of Mqtt protocol, including username and password
	/// </summary>
	// Token: 0x020000C2 RID: 194
	public class MqttCredential
	{
		/// <summary>
		/// 实例化一个默认的对象<br />
		/// Instantiate a default object
		/// </summary>
		// Token: 0x06000E51 RID: 3665 RVA: 0x00015527 File Offset: 0x00013727
		public MqttCredential()
		{
		}

		/// <summary>
		/// 实例化指定的用户名和密码的对象<br />
		/// Instantiates an object with the specified username and password
		/// </summary>
		/// <param name="name">用户名</param>
		/// <param name="pwd">密码</param>
		// Token: 0x06000E52 RID: 3666 RVA: 0x000541D8 File Offset: 0x000523D8
		public MqttCredential(string name, string pwd)
		{
			this.UserName = name;
			this.Password = pwd;
		}

		/// <summary>
		/// 获取或设置用户名<br />
		/// Get or set username
		/// </summary>
		// Token: 0x1700021B RID: 539
		// (get) Token: 0x06000E53 RID: 3667 RVA: 0x000541F2 File Offset: 0x000523F2
		// (set) Token: 0x06000E54 RID: 3668 RVA: 0x000541FA File Offset: 0x000523FA
		public string UserName { get; set; }

		/// <summary>
		/// 获取或设置密码<br />
		/// Get or set password
		/// </summary>
		// Token: 0x1700021C RID: 540
		// (get) Token: 0x06000E55 RID: 3669 RVA: 0x00054203 File Offset: 0x00052403
		// (set) Token: 0x06000E56 RID: 3670 RVA: 0x0005420B File Offset: 0x0005240B
		public string Password { get; set; }

		/// <inheritdoc />
		// Token: 0x06000E57 RID: 3671 RVA: 0x00054214 File Offset: 0x00052414
		public override string ToString()
		{
			return this.UserName;
		}
	}
}
